<template>
	<view class="container">
		<u-tabs-swiper
			ref="uTabs"
			:fontSize="tabOptions['font-size']"
			:activeColor="tabOptions['active-color']"
			:inactiveColor="tabOptions['inactive-color']"
			:barWidth="tabOptions['bar-width']"
			:bgColor="tabOptions['bg-color']"
			:gutter="tabOptions.gutter"
			:list="list"
			:current="current"
			@change="tabsChange"
			:is-scroll="false"
			swiperWidth="750"
		/>
		<salesdata v-if="current == 0" />
		<customer v-if="current == 1" />
		<operation v-if="current == 2" />
	</view>
</template>

<script>
import salesdata from './salesdata.vue'
import customer from './customer.vue'
import operation from './operation.vue'
export default {
	components: {
		salesdata,
		customer,
		operation
	},
	data() {
		return {
			current: 0,
			list: [
				{
					name: '销售数据',
					type: 0
				},
				{
					name: '客户详情',
					type: 1
				},
				{
					name: '运营数据',
					type: 2
				}
			],
			current: 0,
			swiperCurrent: 0, //
			tabOptions: {
				'font-size': 30,
				'active-color': '#F95513',
				'inactive-color': '#656565',
				'bar-width': 106,
				'bg-color': '',
				gutter: 28
			}
		}
	},
	methods: {
		tabsChange(index) {
			this.current = index
		}
	}
}
</script>

<style lang="scss" acoped>
.container {
	width: 750rpx;
	// height: 100vh;
	// overflow: scroll;
	background: linear-gradient(180deg, #c1f26d 0%, #f6f6f6 100%);
}
</style>
